<?php

declare(strict_types=1);

namespace App\Command;

use App\Repositories\RbacRouteRepository;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;

/**
 * @Command
 */
class CreateBaseRoute extends HyperfCommand
{
    /**
     * @var ContainerInterface
     */
    protected $container;

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;

        parent::__construct('create:base-route');
    }

    public function configure()
    {
        parent::configure();
        $this->setDescription('生成基础路由数据');
    }

    public function handle()
    {
        $route_base=[
            'auth'=>[
                [
                    'name'=>'登录',
                    'label'=> 'admin.v1.login',
                    'url' => '/admin/v1/login',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'刷新token',
                    'label'=> 'admin.v1.refresh-token',
                    'url' => '/admin/v1/refresh-token',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'退出',
                    'label'=> 'admin.v1.logOut',
                    'url' => '/admin/v1/logOut',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'home'=>[
                [
                    'name'=>'首页',
                    'label'=> 'admin.v1.home.index',
                    'url' => '/admin/v1/home/index',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ]
            ],
            'cms'=>[
                [
                    'name'=>'选择分类',
                    'label'=> 'admin.v1.cms.category.select',
                    'url' => '/admin/v1/cms/category/select',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类列表',
                    'label'=> 'admin.v1.cms.category.list',
                    'url' => '/admin/v1/cms/category/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类详情',
                    'label'=> 'admin.v1.cms.category.detail',
                    'url' => '/admin/v1/cms/category/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类保存',
                    'label'=> 'admin.v1.cms.category.store',
                    'url' => '/admin/v1/cms/category/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'分类删除',
                    'label'=> 'admin.v1.cms.category.delete',
                    'url' => '/admin/v1/cms/category/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'内容列表',
                    'label'=> 'admin.v1.cms.post.list',
                    'url' => '/admin/v1/cms/post/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'内容详情',
                    'label'=> 'admin.v1.cms.post.detail',
                    'url' => '/admin/v1/cms/post/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'单页详情',
                    'label'=> 'admin.v1.cms.post.page',
                    'url' => '/admin/v1/cms/post/page',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'内容保存',
                    'label'=> 'admin.v1.cms.post.store',
                    'url' => '/admin/v1/cms/post/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'内容删除',
                    'label'=> 'admin.v1.cms.post.delete',
                    'url' => '/admin/v1/cms/post/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'rbac.manager'=>[
                [
                    'name'=>'全部管理员',
                    'label'=> 'admin.v1.rbac.manager.all',
                    'url' => '/admin/v1/rbac/manager/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'管理员列表',
                    'label'=> 'admin.v1.rbac.manager.list',
                    'url' => '/admin/v1/rbac/manager/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'管理员获取权限',
                    'label'=> 'admin.v1.rbac.manager.get.menu',
                    'url' => '/admin/v1/rbac/manager/get/menu',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'管理员详情',
                    'label'=> 'admin.v1.rbac.manager.detail',
                    'url' => '/admin/v1/rbac/manager/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'管理员保存',
                    'label'=> 'admin.v1.rbac.manager.store',
                    'url' => '/admin/v1/rbac/manager/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'管理员删除',
                    'label'=> 'admin.v1.rbac.manager.delete',
                    'url' => '/admin/v1/rbac/manager/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'管理员状态',
                    'label'=> 'admin.v1.rbac.manager.change-field',
                    'url' => '/admin/v1/rbac/manager/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'rbac.role'=>[
                [
                    'name'=>'全部角色',
                    'label'=> 'admin.v1.rbac.role.all',
                    'url' => '/admin/v1/rbac/role/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'角色列表',
                    'label'=> 'admin.v1.rbac.role.list',
                    'url' => '/admin/v1/rbac/role/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'角色详情',
                    'label'=> 'admin.v1.rbac.role.detail',
                    'url' => '/admin/v1/rbac/role/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'角色保存',
                    'label'=> 'admin.v1.rbac.role.store',
                    'url' => '/admin/v1/rbac/role/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'角色删除',
                    'label'=> 'admin.v1.rbac.role.delete',
                    'url' => '/admin/v1/rbac/role/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'角色状态',
                    'label'=> 'admin.v1.rbac.role.change-field',
                    'url' => '/admin/v1/rbac/role/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'配置权限',
                    'label'=> 'admin.v1.rbac.role.config-permission-store',
                    'url' => '/admin/v1/rbac/role/config-permission-store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'rbac.permission'=>[
                [
                    'name'=>'全部权限',
                    'label'=> 'admin.v1.rbac.permission.all',
                    'url' => '/admin/v1/rbac/permission/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'权限列表',
                    'label'=> 'admin.v1.rbac.permission.list',
                    'url' => '/admin/v1/rbac/permission/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'权限详情',
                    'label'=> 'admin.v1.rbac.permission.detail',
                    'url' => '/admin/v1/rbac/permission/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'权限保存',
                    'label'=> 'admin.v1.rbac.permission.store',
                    'url' => '/admin/v1/rbac/permission/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'权限删除',
                    'label'=> 'admin.v1.rbac.permission.delete',
                    'url' => '/admin/v1/rbac/permission/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'权限状态',
                    'label'=> 'admin.v1.rbac.permission.change-field',
                    'url' => '/admin/v1/rbac/permission/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'rbac.menu'=>[
                [
                    'name'=>'全部菜单',
                    'label'=> 'admin.v1.rbac.menu.all',
                    'url' => '/admin/v1/rbac/menu/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'菜单选择',
                    'label'=> 'admin.v1.rbac.menu.select',
                    'url' => '/admin/v1/rbac/menu/select',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'菜单列表',
                    'label'=> 'admin.v1.rbac.menu.list',
                    'url' => '/admin/v1/rbac/menu/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'菜单详情',
                    'label'=> 'admin.v1.rbac.menu.detail',
                    'url' => '/admin/v1/rbac/menu/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'菜单保存',
                    'label'=> 'admin.v1.rbac.menu.store',
                    'url' => '/admin/v1/rbac/menu/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'菜单删除',
                    'label'=> 'admin.v1.rbac.menu.delete',
                    'url' => '/admin/v1/rbac/menu/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'菜单状态',
                    'label'=> 'admin.v1.rbac.menu.change-field',
                    'url' => '/admin/v1/rbac/menu/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'rbac.route'=>[
                [
                    'name'=>'全部路由',
                    'label'=> 'admin.v1.rbac.route.all',
                    'url' => '/admin/v1/rbac/route/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'路由常量',
                    'label'=> 'admin.v1.rbac.route.consts',
                    'url' => '/admin/v1/rbac/route/consts',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'路由列表',
                    'label'=> 'admin.v1.rbac.route.list',
                    'url' => '/admin/v1/rbac/route/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'路由详情',
                    'label'=> 'admin.v1.rbac.route.detail',
                    'url' => '/admin/v1/rbac/route/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'路由保存',
                    'label'=> 'admin.v1.rbac.route.store',
                    'url' => '/admin/v1/rbac/route/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'路由删除',
                    'label'=> 'admin.v1.rbac.route.delete',
                    'url' => '/admin/v1/rbac/route/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'路由状态',
                    'label'=> 'admin.v1.rbac.route.change-field',
                    'url' => '/admin/v1/rbac/route/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'user'=>[
                [
                    'name'=>'会员列表',
                    'label'=> 'admin.v1.user.list',
                    'url' => '/admin/v1/user/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'会员详情',
                    'label'=> 'admin.v1.user.detail',
                    'url' => '/admin/v1/user/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'会员删除',
                    'label'=> 'admin.v1.user.delete',
                    'url' => '/admin/v1/user/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'common'=>[
                [
                    'name'=>'获取地区',
                    'label'=> 'admin.v1.common.area.all',
                    'url' => '/admin/v1/common/area/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ]
            ],
            'media'=>[
                [
                    'name'=>'上传图片',
                    'label'=> 'admin.v1.media.upload.image',
                    'url' => '/admin/v1/media/upload/image',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'上传文件',
                    'label'=> 'admin.v1.media.upload.file',
                    'url' => '/admin/v1/media/upload/file',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'全部相册',
                    'label'=> 'admin.v1.media.album.all',
                    'url' => '/admin/v1/media/album/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'相册图片',
                    'label'=> 'admin.v1.media.album.pictures',
                    'url' => '/admin/v1/media/album/pictures',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
            ],
            'sys'=>[
                [
                    'name'=>'配置保存',
                    'label'=> 'admin.v1.sys.config.store',
                    'url' => '/admin/v1/sys/config/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'获取配置',
                    'label'=> 'admin.v1.sys.config.get',
                    'url' => '/admin/v1/sys/config/get',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
            ],
            'poster'=>[
                [
                    'name'=>'推荐位列表',
                    'label'=> 'admin.v1.poster.list',
                    'url' => '/admin/v1/poster/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'推荐位详情',
                    'label'=> 'admin.v1.poster.detail',
                    'url' => '/admin/v1/poster/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'推荐位保存',
                    'label'=> 'admin.v1.poster.store',
                    'url' => '/admin/v1/poster/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'推荐位删除',
                    'label'=> 'admin.v1.poster.delete',
                    'url' => '/admin/v1/poster/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'推荐位数据列表',
                    'label'=> 'admin.v1.poster.datum.list',
                    'url' => '/admin/v1/poster/datum/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'推荐位数据详情',
                    'label'=> 'admin.v1.poster.datum.detail',
                    'url' => '/admin/v1/poster/datum/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'推荐数据保存',
                    'label'=> 'admin.v1.poster.datum.store',
                    'url' => '/admin/v1/poster/datum/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'推荐位数据删除',
                    'label'=> 'admin.v1.poster.datum.delete',
                    'url' => '/admin/v1/poster/datum/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'推荐位数据状态',
                    'label'=> 'admin.v1.poster.datum.change-field',
                    'url' => '/admin/v1/poster/datum/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ],
            'ad'=>[
                [
                    'name'=>'选择广告位',
                    'label'=> 'admin.v1.ad.space.all',
                    'url' => '/admin/v1/ad/space/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'广告位列表',
                    'label'=> 'admin.v1.ad.space.list',
                    'url' => '/admin/v1/ad/space/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'广告位详情',
                    'label'=> 'admin.v1.ad.space.detail',
                    'url' => '/admin/v1/ad/space/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'广告位保存',
                    'label'=> 'admin.v1.ad.space.store',
                    'url' => '/admin/v1/ad/space/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'广告位删除',
                    'label'=> 'admin.v1.ad.space.delete',
                    'url' => '/admin/v1/ad/space/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'广告数据列表',
                    'label'=> 'admin.v1.ad.datum.list',
                    'url' => '/admin/v1/ad/datum/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'广告位数据详情',
                    'label'=> 'admin.v1.ad.datum.detail',
                    'url' => '/admin/v1/ad/datum/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'广告数据保存',
                    'label'=> 'admin.v1.ad.datum.store',
                    'url' => '/admin/v1/ad/datum/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'广告位数据删除',
                    'label'=> 'admin.v1.ad.datum.delete',
                    'url' => '/admin/v1/ad/datum/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'广告位数据状态',
                    'label'=> 'admin.v1.ad.datum.change-field',
                    'url' => '/admin/v1/ad/datum/change-field',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
            ]
        ];
        $route_adv=[
            'company.unit'=>[
                [
                    'name'=>'选择单位',
                    'label'=> 'admin.v1.company.unit.select',
                    'url' => '/admin/v1/company/unit/select',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'单位列表',
                    'label'=> 'admin.v1.company.unit.list',
                    'url' => '/admin/v1/company/unit/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'单位详情',
                    'label'=> 'admin.v1.company.unit.detail',
                    'url' => '/admin/v1/company/unit/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'单位保存',
                    'label'=> 'admin.v1.company.unit.store',
                    'url' => '/admin/v1/company/unit/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'单位删除',
                    'label'=> 'admin.v1.company.unit.delete',
                    'url' => '/admin/v1/company/unit/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'position.category'=>[
                [
                    'name'=>'选择分类',
                    'label'=> 'admin.v1.point-position.category.all',
                    'url' => '/admin/v1/point-position/category/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类列表',
                    'label'=> 'admin.v1.point-position.category.list',
                    'url' => '/admin/v1/point-position/category/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类详情',
                    'label'=> 'admin.v1.point-position.category.detail',
                    'url' => '/admin/v1/point-position/category/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分类保存',
                    'label'=> 'admin.v1.point-position.category.store',
                    'url' => '/admin/v1/point-position/category/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'分类删除',
                    'label'=> 'admin.v1.point-position.category.delete',
                    'url' => '/admin/v1/point-position/category/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'position.position'=>[
                [
                    'name'=>'选择点位',
                    'label'=> 'admin.v1.point-position.position.all',
                    'url' => '/admin/v1/point-position/position/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'点位列表',
                    'label'=> 'admin.v1.point-position.position.list',
                    'url' => '/admin/v1/point-position/position/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'分配点位列表',
                    'label'=> 'admin.v1.point-position.position.list-assign',
                    'url' => '/admin/v1/point-position/position/list-assign',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'点位详情',
                    'label'=> 'admin.v1.point-position.position.detail',
                    'url' => '/admin/v1/point-position/position/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'点位保存',
                    'label'=> 'admin.v1.point-position.position.store',
                    'url' => '/admin/v1/point-position/position/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'点位删除',
                    'label'=> 'admin.v1.point-position.position.delete',
                    'url' => '/admin/v1/point-position/position/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'点位分配管理员',
                    'label'=> 'admin.v1.point-position.position.assign-manager',
                    'url' => '/admin/v1/point-position/position/assign-manager',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'点位分配管理员保存',
                    'label'=> 'admin.v1.point-position.position.assign-manager-store',
                    'url' => '/admin/v1/point-position/position/assign-manager-store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'position.paper'=>[
                [
                    'name'=>'问卷所有题目',
                    'label'=> 'admin.v1.point-position.paper.all',
                    'url' => '/admin/v1/point-position/paper/all',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'监督列表',
                    'label'=> 'admin.v1.point-position.paper.answers',
                    'url' => '/admin/v1/point-position/paper/answers',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'监督详情',
                    'label'=> 'admin.v1.point-position.paper.answer.detail',
                    'url' => '/admin/v1/point-position/paper/answer/detail',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'问卷配置保存',
                    'label'=> 'admin.v1.point-position.paper.store',
                    'url' => '/admin/v1/point-position/paper/store',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'问卷配置删除',
                    'label'=> 'admin.v1.point-position.paper.delete',
                    'url' => '/admin/v1/point-position/paper/delete',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ],
                [
                    'name'=>'监督回复',
                    'label'=> 'admin.v1.point-position.paper.answer.reply',
                    'url' => '/admin/v1/point-position/paper/answer/reply',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ],
            'position.supervisor'=>[
                [
                    'name'=>'监督员列表',
                    'label'=> 'admin.v1.point-position.supervisor.list',
                    'url' => '/admin/v1/point-position/supervisor/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'监督申请列表',
                    'label'=> 'admin.v1.point-position.supervisor.apply.list',
                    'url' => '/admin/v1/point-position/supervisor/apply/list',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'监督员申请常量',
                    'label'=> 'admin.v1.point-position.supervisor.apply.consts',
                    'url' => '/admin/v1/point-position/supervisor/apply/consts',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'我的点位',
                    'label'=> 'admin.v1.point-position.supervisor.own-position',
                    'url' => '/admin/v1/point-position/supervisor/own-position',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'GET'
                ],
                [
                    'name'=>'监督员更改状态',
                    'label'=> 'admin.v1.point-position.supervisor.apply.change-status',
                    'url' => '/admin/v1/point-position/supervisor/apply/change-status',
                    'guard_name'=>'admin',
                    'type' => 'adminapi',
                    'method'=>'POST'
                ]
            ]
        ];
        $this->line('command start', 'info');
        $routes = array_merge($route_base,$route_adv);
        foreach ($routes as $key=>$module){
            foreach ($module as $mod){
                $result = RbacRouteRepository::getInstance()->store($mod);
                $this->line($result['data']->id.'保存成功','info');
            }
        }
        $this->line('command end','info');
    }
}
